*Table A.24: Meal and Snack treatment effects on food preferences (adults)
cd ""

use "master_data_adults_child_s13456_shared.dta", clear 

drop meal_control snack_control
gen meal_control=1 if treatment==2
replace meal_control=0 if treatment==1
tab meal_control

gen snack_control=1 if treatment==3
replace snack_control=0 if treatment==1
tab snack_control

drop if type_id=="X" // **Dropping newborns born during the three years of study
drop if id=="3885553B" //**error in the id number and empty data
drop if id=="3885553G" //**error in the id number and empty data
replace treatment=2 if id=="38855553B" //**retrieving the correct treatment for this id
replace treatment=2 if id=="38855553G" //**retrieving the correct treatment for this id
drop if id=="101aa22c" //**this id does not exist
drop if id=="27655663" //**outlier on many measurements

**ADULTS***
xi: xtreg fp_fruit i.treatment*i.session if child==0,  i(id_nb) cluster(hh_id) nonest fe
xi: xtreg fp_veg i.treatment*i.session if child==0,  cluster(hh_id) i(id_nb) nonest fe
xi: xtreg fp_meat_fish_egg i.treatment*i.session if child==0,  cluster(hh_id) i(id_nb) nonest fe
xi: xtreg fp_processed i.treatment*i.session if child==0,  cluster(hh_id) i(id_nb) nonest fe
xi: xtreg fp_sweets i.treatment*i.session if child==0,  cluster(hh_id) i(id_nb) nonest fe
xi: xtreg fp_bread i.treatment*i.session if child==0,  cluster(hh_id) i(id_nb) nonest fe
xi: xtreg fp_cheese i.treatment*i.session if child==0,  cluster(hh_id) i(id_nb) nonest fe

 

 